package modulos.util;

import java.util.Map;

import javax.faces.context.FacesContext;

/**
 * @author Eduardo Ordine
 */
public class Util
{
	@SuppressWarnings("unchecked")
	protected static Map getSessionMap()
	{
		return FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
	}
	
	@SuppressWarnings("unchecked")
	public static void setSessionProperty(String key, Object value)
	{
		getSessionMap().put(key, value);
	}
	
	public static Object getSessionProperty(String key)
	{
		return getSessionMap().get(key);
	}
	
	public static void delSessionProperty(String key)
	{
		getSessionMap().remove(key);
	}
}